<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/static/include/taglib.jsp"%>

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="/static/js/product/typeSpec.js"></script>
</head>
<body>
<!-- <div class="modal-content"> -->
    <div class="modal-header">
        <button class="close" type="button" data-dismiss="modal">×</button>
        <h4 class="modal-title" id="viewModalLabel">修改（${type.name }）规格</h4>
    </div>
    <div class="modal-body">
    	<form method="post" id="typeSpecFrom" action="${path }/product/goodsType/saveTypeSpec">
			<table cellspacing="1" cellpadding="3" width="100%" class="table table-striped table-bordered table-hover dataTable">
				<tr>
					<td>
					<select name="specList" id="spec_sel" multiple="true" class="form-control"
						style="width: 220px; height: 250px;">
						<c:forEach items="${specs }" var="spec">
							<option value="${spec.id }">${spec.specName }</option>
						</c:forEach>
					</select>
					<td>
						<button type="button" class="btn btn-default" id="rightBtn" >&nbsp;->></button>
						<br /> <br /> 
						<button type="button" class="btn btn-default" id="leftBtn" >&nbsp;<<-</button>
						<br /> <br /> 
						<button type="button" class="btn btn-default" id="resetBtn" >清空</button>
					</td>
					<td>
						<select  name="chooseSpecs" id="choose_sel" multiple="true" class="form-control"
							style="width: 220px; height: 250px;">
							<c:forEach items="${selectedSpecs }" var="selected">
								<option value="${selected.specification.id }" selected="true">${selected.specification.specName }</option>
							</c:forEach>
						</select>
					</td>
				</tr>
			</table>
			<input type="hidden" name="id" value="${param.id}">
		</form>
    </div>
    <div class="modal-footer">
    	<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        <button type="submit" class="btn btn-primary" onclick="doSubmit()">提交更改</button>
    </div>
 <!-- </div> -->
</body>
</html>